package com.ruoyi.slope.ai.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.ai.mapper.SlopeAiAlertRuleConfigMapper;
import com.ruoyi.slope.ai.domain.SlopeAiAlertRuleConfig;
import com.ruoyi.slope.ai.service.ISlopeAiAlertRuleConfigService;

/**
 * 预警规则配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeAiAlertRuleConfigServiceImpl implements ISlopeAiAlertRuleConfigService 
{
    @Autowired
    private SlopeAiAlertRuleConfigMapper slopeAiAlertRuleConfigMapper;

    /**
     * 查询预警规则配置
     * 
     * @param ruleId 预警规则配置主键
     * @return 预警规则配置
     */
    @Override
    public SlopeAiAlertRuleConfig selectSlopeAiAlertRuleConfigByRuleId(String ruleId)
    {
        return slopeAiAlertRuleConfigMapper.selectSlopeAiAlertRuleConfigByRuleId(ruleId);
    }

    /**
     * 查询预警规则配置列表
     * 
     * @param slopeAiAlertRuleConfig 预警规则配置
     * @return 预警规则配置
     */
    @Override
    public List<SlopeAiAlertRuleConfig> selectSlopeAiAlertRuleConfigList(SlopeAiAlertRuleConfig slopeAiAlertRuleConfig)
    {
        return slopeAiAlertRuleConfigMapper.selectSlopeAiAlertRuleConfigList(slopeAiAlertRuleConfig);
    }

    /**
     * 新增预警规则配置
     * 
     * @param slopeAiAlertRuleConfig 预警规则配置
     * @return 结果
     */
    @Override
    public int insertSlopeAiAlertRuleConfig(SlopeAiAlertRuleConfig slopeAiAlertRuleConfig)
    {
        return slopeAiAlertRuleConfigMapper.insertSlopeAiAlertRuleConfig(slopeAiAlertRuleConfig);
    }

    /**
     * 修改预警规则配置
     * 
     * @param slopeAiAlertRuleConfig 预警规则配置
     * @return 结果
     */
    @Override
    public int updateSlopeAiAlertRuleConfig(SlopeAiAlertRuleConfig slopeAiAlertRuleConfig)
    {
        return slopeAiAlertRuleConfigMapper.updateSlopeAiAlertRuleConfig(slopeAiAlertRuleConfig);
    }

    /**
     * 批量删除预警规则配置
     * 
     * @param ruleIds 需要删除的预警规则配置主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiAlertRuleConfigByRuleIds(String[] ruleIds)
    {
        return slopeAiAlertRuleConfigMapper.deleteSlopeAiAlertRuleConfigByRuleIds(ruleIds);
    }

    /**
     * 删除预警规则配置信息
     * 
     * @param ruleId 预警规则配置主键
     * @return 结果
     */
    @Override
    public int deleteSlopeAiAlertRuleConfigByRuleId(String ruleId)
    {
        return slopeAiAlertRuleConfigMapper.deleteSlopeAiAlertRuleConfigByRuleId(ruleId);
    }
}
